package org.msfj.common.config;

import org.msfj.common.config.SmsTemplateKeyConfig;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SmsConfig {

    @Bean
    @ConditionalOnProperty(name = "submail.appKey")
    @ConfigurationProperties(prefix = "submail.template-key")
    SmsTemplateKeyConfig smsTemplateKeyConfig() {
        return new SmsTemplateKeyConfig();
    }
}
